package com.hylanda.va.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hylanda.va.dao.TDepartmentRepository;
import com.hylanda.va.entity.TDepartment;

/** 
 * @author zhangy
 * @E-mail:blackoon88@gmail.com 
 * @qq:846579287
 * @version created at：2018年5月25日 下午3:57:21 
 * note
 */
@Service
public class TDepartmentService {
	@Autowired
	private TDepartmentRepository tDepartmentRepository;
	
	private List<TDepartment> depts=null;
	public List<TDepartment> getAllDepartment(){
		if(depts==null){
			depts=tDepartmentRepository.findAll();
		}
		return depts;
	}
}
